/*
 * 项目名称:    wms-app-xinpu
 * 创建人员:    DongPeng
 * 创建时间:    2023-02-28
 * copyright(c) 2022 无锡星智数服科技有限公司
 */
package org.jeecg.modules.dock.client;


import com.dtflys.forest.annotation.*;
import com.dtflys.forest.converter.json.ForestJacksonConverter;
import org.jeecg.modules.dock.constant.SystemConstants;
import org.jeecg.modules.dock.entity.dto.response.*;

import java.util.List;

/**
 * SAP对接接口
 *
 * @author DongPeng
 * @version 1.0.0
 * @date 2023-02-28
 * @description 类描述
 */
@BaseRequest(
        baseURL = "${sapAddress}",
        headers = {"~request_method:POST", "content-Type:application/json", SystemConstants.SYS_HEADER + ":" + SystemConstants.SAP}
)
@ForestClient
public interface SapRequestClient extends BaseRequestClient {

    /**
     * 向sap发送主数据请求
     *
     * @param business
     * @return
     */
    @PostRequest(value = "/sap/bc/rest/zmes_interface?sap-client=${sapClient}", decoder = ForestJacksonConverter.class)
    MasterDataResponseDTO sapMaster(@Header("business") String business, @Body String jsonBody);

    /**
     * 钢卷批次特性调用
     *
     * @param business
     * @param jsonBody
     * @return
     */
    @PostRequest(value = "/sap/bc/rest/zmes_interface?sap-client=${sapClient}", decoder = ForestJacksonConverter.class)
    List<SapSteelCoilResponseDTO> getSapSteelCoilInfo(@Header("business") String business, @Body String jsonBody);

    /**
     * 原卷UB单收货接口
     *
     * @param business
     * @param jsonBody
     * @return
     */
    @PostRequest(value = "/sap/bc/rest/zmes_interface?sap-client=${sapClient}", decoder = ForestJacksonConverter.class)
    List<OriginalVolumeUbOrderTakeOverResponseDTO> getOriginalVolumeUbOrderTakeOver(@Header("business") String business, @Body String jsonBody);

    /**
     * 外购收货接口（辅材）
     *
     * @param business
     * @param jsonBody
     * @return
     */
    @PostRequest(value = "/sap/bc/rest/zmes_interface?sap-client=${sapClient}", decoder = ForestJacksonConverter.class)
    List<PurchaseReceiptAssistResponseDTO> getPurchaseReceiptAssist(@Header("business") String business, @Body String jsonBody);

    /**
     * 外购收货接口（原卷/成品）
     *
     * @param business
     * @param jsonBody
     * @return
     */
    @PostRequest(value = "/sap/bc/rest/zmes_interface?sap-client=${sapClient}", decoder = ForestJacksonConverter.class)
    List<PurchaseReceiptFinishProductResponseDTO> getPurchaseReceiptFinishProduct(@Header("business") String business, @Body String jsonBody);

    /**
     * 销售出库过账接口
     *
     * @param business 业务代码
     * @param jsonBody 数据
     * @return java.util.List<org.jeecg.modules.dock.entity.dto.response.SellOutboundResponseDTO>
     * @author hansen
     * @since 2023/9/14 10:58
     */
    @PostRequest(value = "/sap/bc/rest/zmes_interface?sap-client=${sapClient}", decoder = ForestJacksonConverter.class)
    SellOutboundResponseDTO sapSellOutbound(@Header("business") String business, @Body String jsonBody);

    /**
     * 成品UB单收货接口
     *
     * @param business 业务代码
     * @param jsonBody 数据
     * @return java.util.List<org.jeecg.modules.dock.entity.dto.response.ProductReceptionResponseDTO>
     * @author hansen
     * @since 2023/9/14 13:29
     */
    @PostRequest(value = "/sap/bc/rest/zmes_interface?sap-client=${sapClient}", decoder = ForestJacksonConverter.class)
    List<ProductReceptionResponseDTO> sapProductHarvest(@Header("business") String business, @Body String jsonBody);

    /**
     * 研发领料
     *
     * @param business 业务代码
     * @param jsonBody 数据
     * @return java.util.List<org.jeecg.modules.dock.entity.dto.response.SapBaseResponseDTO>
     * @author hansen
     * @since 2023/9/14 13:47
     */
    @PostRequest(value = "/sap/bc/rest/zmes_interface?sap-client=${sapClient}", decoder = ForestJacksonConverter.class)
    List<SapBaseResponseDTO> sapResearchGet(@Header("business") String business, @Body String jsonBody);

    /**
     * 辅料成本中心领用接口
     *
     * @param business 业务代码
     * @param jsonBody 数据
     * @return java.util.List<org.jeecg.modules.dock.entity.dto.response.SapBaseResponseDTO>
     * @author hansen
     * @since 2023/9/14 14:00
     */
    @PostRequest(value = "/sap/bc/rest/zmes_interface?sap-client=${sapClient}", decoder = ForestJacksonConverter.class)
    List<IngredientsGetResponseDTO> sapIngredientsGet(@Header("business") String business, @Body String jsonBody);

    /**
     * 物料批次特性查询
     *
     * @param business 业务代码
     * @param jsonBody 数据
     * @return java.util.List<org.jeecg.modules.dock.entity.dto.response.MaterialBatchPeculiarityResponseDTO>
     * @author FangYongliang
     * @since 2023/10/9 15:51:48
     */
    @PostRequest(value = "/sap/bc/rest/zmes_interface?sap-client=${sapClient}", decoder = ForestJacksonConverter.class)
    List<MaterialBatchPeculiarityResponseDTO> materialPeculiarity(@Header("business") String business, @Body String jsonBody);

    /**
     * 纸筒采购订单创建接口
     *
     * @param business 业务代码
     * @param jsonBody 数据
     * @return java.util.List<org.jeecg.modules.dock.entity.dto.response.SapBaseResponseDTO>
     * @author lumingyi
     * @since 2023/11/15 08:47
     */
    @PostRequest(value = "/sap/bc/rest/zmes_interface?sap-client=${sapClient}", decoder = ForestJacksonConverter.class)
    List<PaperPurchaseResponseDTO> sapPushPaperPurchase(@Header("business") String business, @Body String jsonBody);

    /**
     * 条料调拨订单发送接口
     *
     * @param business 业务代码
     * @param jsonBody 数据
     * @return java.util.List<org.jeecg.modules.dock.entity.dto.response.SapBaseResponseDTO>
     * @author lumingyi
     * @since 2023/11/15 08:47
     */
    @PostRequest(value = "/sap/bc/rest/zmes_interface?sap-client=${sapClient}", decoder = ForestJacksonConverter.class)
    SapBaseResponseDTO sendingOfMaterialTransferOrders(@Header("business") String business, @Body String jsonBody);

    /**
     * 库存盘点调整接口
     *
     * @param business 业务代码
     * @param jsonBody 数据
     * @return java.util.List<org.jeecg.modules.dock.entity.dto.response.SapBaseResponseDTO>
     * @author lumingyi
     * @since 2023/11/15 08:47
     */
    @PostRequest(value = "/sap/bc/rest/zmes_interface?sap-client=${sapClient}", decoder = ForestJacksonConverter.class)
    List<InventoryUpdateResponseDTO> inventoryCountAdjustment(@Header("business") String business, @Body String jsonBody);

    /**
     * 库存更新接口
     *
     * @param business
     * @param jsonBody
     */
    @PostRequest(value = "/sap/bc/rest/zmes_interface?sap-client=${sapClient}", decoder = ForestJacksonConverter.class)
    List<InventoryUpdateResponseDTO> inventoryUpdate(@Header("business") String business, @Body String jsonBody);

    /**
     * 销售出库单打印查询接口
     *
     * @param business
     * @param jsonBody
     */
    @PostRequest(value = "/sap/bc/rest/zmes_interface?sap-client=${sapClient}", decoder = ForestJacksonConverter.class)
    SearchPrintInfoHeadResponseDTO saleOutboundPrintInfo(@Header("business") String business, @Body String jsonBody);

    /**
     * 测试接口
     *
     * @param business
     * @param jsonBody
     */
    @PostRequest(value = "/sap/bc/rest/zmes_interface?sap-client=${sapClient}", decoder = ForestJacksonConverter.class)
    Object test(@Header("business") String business, @Body String jsonBody);

    /**
     * 客供料收货接口
     *
     * @param business 业务代码
     * @param jsonBody 数据
     * @return java.util.List<org.jeecg.modules.dock.entity.dto.response.ProductReceptionResponseDTO>
     * @author hansen
     * @since 2023/9/14 13:29
     */
    @PostRequest(value = "/sap/bc/rest/zmes_interface?sap-client=${sapClient}", decoder = ForestJacksonConverter.class)
    List<CustomerSuppliedMaterialResponseDTO> customerSuppliedMaterialHarvest(@Header("business") String business, @Body String jsonBody);

    /**
     * 批次库存查询接口
     *
     * @param business 业务代码
     * @param jsonBody 数据
     * @return
     * @author DongPeng
     * @date 2024/1/4 9:09
     */
    @PostRequest(value = "/sap/bc/rest/zmes_interface?sap-client=${sapClient}", decoder = ForestJacksonConverter.class)
    List<BatchStockQueryResponseDTO> batchStockQuery(@Header("business") String business, @Body String jsonBody);

}
